package com.mm.vo.web.user;

import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 描述: 下拉树形数据格式VO
 *
 * @author: yanglin
 * @Date: 2021-08-13-8:55
 * @Version: 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class DownTreeVo implements Serializable {

    /**
     * ID
     */
    public Integer id;

    /**
     * code
     */
    public Integer code;

    /**
     * 父ID
     */
    public Integer pId;

    /**
     * 名称
     */
    public String title;

    /**
     * 菜单展示标识
     * 默认横向菜单
     * group - 纵向菜单组
     * '-' 分割线
     */
    public String type;

    /**
     * 子集
     */
    public List<DownTreeVo> child = new ArrayList<>();

    @Builder
    public DownTreeVo(Integer id, Integer code, Integer pId, String title, String type, List<DownTreeVo> child) {
        this.id = id;
        this.code = code;
        this.pId = pId;
        this.title = title;
        this.type = type;
        this.child = child;
    }
}
